How to add a Run Button in Visual Studio Code

您所在的位置:网站首页 vs code run code How to add a Run Button in Visual Studio Code

How to add a Run Button in Visual Studio Code

#How to add a Run Button in Visual Studio Code | 来源: 网络整理| 查看: 265

# How to add a Run Button in Visual Studio Code

To add a run button in Visual Studio Code:

Click on Extensions in the left sidebar.You can also open the Extensions menu by pressing:Ctrl + Shift + X on Windows or LinuxCommand + Shift + X on macOSType Code Runner.

Click on the Install button.

Make sure to install the correct Code Runner extension as shown in the code sample.

Once you install the extension, open a file and click the run button to run it.

Make sure to save your file before you run it.

You can view a list of the supported languages on the extension's page.

You can also run the file by pressing F1, typing run code and selecting the command.

You can also use a keyboard shortcut to run the file:

on Windows and Linux: Ctrl + Alt + Non macOS: Cmd + Option + N

If you hide the run button by mistake, right-click on the three dots ... icon at the top right corner and select Run Code.

# Using the debugger as a run button

You can also use the built-in debugger as a run button.

Click on the Run and Debug icon in the Activity Bar on the left.

You can also use the keyboard shortcut to show the debug pane:

on Windows and Linux: press Ctrl + Shift + Don macOS: press Cmd + Shift + DSet a breakpoint in your code. The breakpoint determines where the debugger should stop.

Click on Run and Debug.

The debugger will run your code and will pause at the specified breakpoint.

You can use the arrows at the top of the file to step through your code, restart the debugger or stop it.

You can read more about debugging your code in this section of the official docs.

I've you get the error Linter pylint is not installed error in VS Code, click on the link and follow the instructions.

# Additional Resources

You can learn more about the related topics by checking out the following tutorials:

Code is already running / Cannot edit in read-only editorVS Code: Change Python version & select correct InterpreterCode language not supported or defined VS Code ErrorHow to Reset your Keyboard Shortcuts in Visual Studio CodeHow to Reset Visual Studio Code to the Default Settings


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3